<template>
  <div id="basic-layout">
    <a-layout style="min-height: 100vh">
      <a-layout-header class="header"><GlobalHeader /></a-layout-header>
      <a-layout>
        <GlobalSider class="sider" v-if="loginUserStore.loginUser.id" />
        <a-layout-content class="content">
          <router-view />
        </a-layout-content>
      </a-layout>

      <a-layout-footer class="footer"
        ><a href="https://gitee.com/dshabao" target="_blank">豆云图库 By 豆沙包</a></a-layout-footer
      >
    </a-layout>
  </div>
</template>

<script lang="ts" setup>
import GlobalSider from '@/components/GlobalSider.vue'
import { useLoginUserStore } from '@/stores/user'
import GlobalHeader from '../components/GlobalHeader.vue'

const loginUserStore = useLoginUserStore()
</script>

<style lang="scss" scoped>
#basic-layout {
  .header {
    padding-inline: 20px;
    margin-bottom: 1px;
    color: unset;
    background: white;
  }
  .content {
    // background: linear-gradient(to right, #fefefe, #ffffff);
    // background-color: red;
    padding: 20px;
  }
  .sider {
    background: #fff;
    padding-top: 3px;
    border-right: 0.5px solid #eee;
  }
  .footer {
    background: #efefef;
    text-align: center;
    padding: 10px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  }

  :deep(.ant-menu-root) {
    border-bottom: none important;
    border-inline-end: none important;
  }
}
</style>
